local ruijian = fk.CreateSkill({
  name = "mm__ruijian",
})

ruijian:addEffect("active", {
  anim_type = "offensive",
  card_num = 0,
  target_num = 0,
  prompt="锐谏：弃置任意名其他角色各一张牌，因此失去伤害牌或装备牌的角色对你造成1点伤害。",
  can_use = function(self, player)
    return player:usedSkillTimes(ruijian.name, Player.HistoryPhase) == 0
  end,
  card_filter = Util.FalseFunc,
  target_filter = Util.FalseFunc,
  on_use = function(self, room, effect)
    local player = effect.from
    local targets = table.filter(player.room.alive_players, function(id)
        return id~=player
    end)
    local actor = room:askToChoosePlayers(player, {
      targets = targets,
      min_num = 1,
      max_num = #player.room.alive_players,
      prompt = "弃置任意名其他角色各一张牌",
      skill_name = ruijian.name,
      cancelable = false
    })
    for _, p in ipairs(actor) do
        local card = room:askToChooseCard(player, {
          target = p,
          skill_name = ruijian.name,
          flag = "he",
        })
        if Fk:getCardById(card).type==Card.TypeEquip or Fk:getCardById(card).is_damage_card then
            room:addPlayerMark(p, "mm__ruijian-turn")
        end
        room:throwCard(card, ruijian.name, p, player)
    end
    for _, p in ipairs(actor) do
       if p:getMark("mm__ruijian-turn")~=0 then
        room:damage{
           from = p,
           to = player,
           damage = 1,
           skillName = ruijian.name,
           damageType = fk.NormalDamage
          }
       end
    end
  end,
})


Fk:loadTranslationTable {
["mm__ruijian"] = "锐谏",
[":mm__ruijian"] = "出牌阶段限一次，你可以弃置任意名其他角色各一张牌，因此失去伤害牌或装备牌的角色对你造成1点伤害。",
["$mm__ruijian1"] = "",
["$mm__ruijian2"] = "",
}
return ruijian
